import Vue from 'vue'
import Vuex from 'vuex'
import { setItem, getItem } from '@/utils/storage'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token: getItem('hasToken')
  },
  mutations: {
    setToken (state, data) {
      state.token = data
      setItem('hasToken', state.token)
    }
  },
  actions: {
  },
  modules: {
  }
})
